<?php

    $conn = new mysqli('localhost', 'root', 'root', 'lyy');
    if($conn->connect_error){
        die("连接失败：".$connec_error);
    }
    echo "连接成功<br>";

    $message = "insert into user_center (user, pass) values('clannd',3333)";
    $ret = $conn->query($message);
    if($ret === true){
        echo "注册成功";
    }
    else{
        echo "Error:".$message."<br>".$conn->error;
    }

    $message = "show create table user_center";
    $ret = $conn->query($message);
    $result = mysqli_fetch_array($ret);
    echo "<br>";
    var_dump($result);

    $conn->close();
?>
